package com.gitee.wsl.data.store.datastore

import androidx.datastore.core.DataMigration
import androidx.datastore.core.DataStore
import androidx.datastore.core.handlers.ReplaceFileCorruptionHandler
import androidx.datastore.preferences.core.Preferences
import com.gitee.wsl.Lib
import com.gitee.wsl.ext.config
import kotlinx.coroutines.CoroutineScope
import java.io.File

//actual fun dataStorePreferences(
//    path: String,
//    corruptionHandler: ReplaceFileCorruptionHandler<Preferences>?,
//    coroutineScope: CoroutineScope,
//    migrations: List<DataMigration<Preferences>>,
//): DataStore<Preferences> = createDataStoreWithDefaults(
//    corruptionHandler = corruptionHandler,
//    migrations = migrations,
//    coroutineScope = coroutineScope,
//    pathGetter = {
//        File(Lib.config.appDirs.getUserDataDir(), "datastore/$path").path
//    }
//)
